import dis
from threading import Thread, Lock, RLock

# RLock: 可重入锁，保证acquire()和release()的次数相同，即同一线程可以多次acquire()同一把锁，但必须在每次release()时与最开始的acquire()匹配。

a = 0


def add():
    global a
    a += 1


def sub():
    global a
    a -= 1


if __name__ == "__main__":
    print(dis.dis(add))
    print(dis.dis(sub))
